#include <iostream>

using namespace std;

//incomplet subarrays

int main(){
int n, i, j;
int number[10];

cout<<"Type a number (n<=7): ";
cin>>n;

cout<<"The subarrays generated are: "<<endl;
for(i=1;i<=n; i++){
	number[i-1]=i;}
for(j=0; j<n; j++){
    for (i=0;i<=j; i++)
        cout<<number[i]<<" ";
    cout<<"; ";
    for (i=j+1;i<n; i++)
        cout<<number[i]<<" ";
    cout<<"; ";}
	cout<<endl;
return 0;
}
